{% extends "base.html" %}
{% load common_filters %}
{% load static %}

{% block title %}
    Course Home | {{ block.super }}
{% endblock title %}

{% block stylesheets %}
    {{ block.super }}
    <!-- Custom styles for this template -->
    <link href="{% static "laioffer/css/dashboard.css" %}" rel="stylesheet">
    <link href="{% static "hljs/default.min.css" %}" rel="stylesheet">
    <script type="text/javascript" src="{% static "hljs/highlight.min.js" %}"></script>
    <script type="text/javascript" src="{% static "codemirror/lib/codemirror.js" %}"></script>
    <link rel="stylesheet" href="{% static "codemirror/lib/codemirror.css" %}">
    <script type="text/javascript" src="{% static "codemirror/mode/python.js" %}"></script>
{% endblock stylesheets %}

{% block content %}
    {% if request.user.current_group == "Teacher" %}
        {% include "_teacher_sidebar.html" %}
    {% elif request.user.current_group == "Supervisor" %}
        {% include "_admin_sidebar.html" %}
    {% elif request.user.current_group == "Student" %}
        {% include "_student_sidebar.html" %}
    {% elif request.user.current_group == "Assistant" %}
        {% include "_ta_sidebar.html" %}
    {% endif %}

    <section id="main-content">
        <section class="wrapper">
            <div class="panel">
                <div class="panel-heading">
                    {{ lecture.title }}
                </div>
                <div class="panel-body">
                    <b>Live:</b><a
                            href="{{ lecture.course.course_teach_url }}">{{ lecture.course.course_teach_url }}</a>
                </div>
                <div class="panel-body">
                    <div class="lecture">
                        <div id="lecture-contents">
                            {% include "_message.html" %}
                            {% autoescape off %}
                                {{ lecture.formatted_markdown }}
                            {% endautoescape %}
                        </div>
                    </div>
                </div>
            </div>


        </section>
    </section>


{% endblock content %}
